//
// Created by 31897 on 2021/11/2.
//

#include <iostream>

using namespace std;

int main(){
    int n;
    cin >> n;
    int *a = new int[n];
    for(int i = 0;i<n;i++){
        cin >> a[i];
    }
    int count = 0,candidate = 0;
    for(int i = 0;i<n;i++){
        if(i==0){
            candidate = a[i];
            count++;
        }
        else if(count==0){
            candidate = a[i];
            count++;
        }
        else if(a[i]!=candidate){
            count--;
        }
        else{
            count++;
        }
    }
    int num = 0;
    for(int i = 0;i<n;i++){
        if(a[i]==candidate){
            num++;
        }
    }
    if(num > n/2){
        cout<< candidate<<endl;
    }
    else{
        cout << "null"<<endl;
    }
    return 0;
}